package gmusic.bo;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class ReleaseBean {

	protected int id;

	protected long maid;

	protected String nom;

	protected int artistId;
	
	private long artistMaId;

	protected int annee = 0;

	protected int idStyle = -1;

	protected int idLabel = -1;

	protected String commentaire = null;

	protected int typeId;

	protected String URLCover;

	protected List<TrackBean> tracks = new ArrayList<TrackBean>();

	public ReleaseBean() {
	}

	public ReleaseBean(ResultSet rs) throws SQLException {

		setId(rs.getInt("al_id"));
		setNom(rs.getString("al_nom"));
		setArtistId(rs.getInt("al_gr_id"));
		setAnnee(rs.getInt("al_annee"));
		setIdStyle(rs.getInt("al_st_id"));
		setIdLabel(rs.getInt("al_la_id"));
		setURLCover(rs.getString("al_image"));
		setCommentaire(rs.getString("al_commentaire"));
		setTypeId(rs.getInt("al_ty_id"));
	}

	public int getId() {
		return id;
	}

	public void setId(int i) {
		id = i;
	}

	public int getGmid() {
		return id;
	}

	public void setGmid(int i) {
		id = i;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String n) {
		nom = n;
	}

	/** @deprecated */
	public int getIdGroupe() {
		return artistId;
	}

	/** @deprecated */
	public void setIdGroupe(int g) {
		artistId = g;
	}

	public int getArtistId() {
		return artistId;
	}
	
	public int getArtistGmid() {
		return artistId;
	}

	public void setArtistId(int g) {
		artistId = g;
	}

	public int getAnnee() {
		return annee;
	}

	public void setAnnee(int a) {
		annee = a;
	}

	public int getIdStyle() {
		return idStyle;
	}

	public void setIdStyle(int s) {
		idStyle = s;
	}

	public int getIdLabel() {
		return idLabel;
	}

	public void setIdLabel(int l) {
		idLabel = l;
	}

	public String getCommentaire() {
		return commentaire;
	}

	public void setCommentaire(String c) {
		commentaire = c;
	}

	/** @deprecated */
	public int getIdType() {
		return typeId;
	}

	/** @deprecated */
	public void setIdType(int t) {
		typeId = t;
	}

	public int getTypeId() {
		return typeId;
	}

	public void setTypeId(int t) {
		typeId = t;
	}

	public List<TrackBean> getTracks() {
		return tracks;
	}

	public void setTracks(List<TrackBean> tracks) {
		this.tracks = tracks;
	}

	public String getURLCover() {
		return URLCover;
	}

	public void setURLCover(String cover) {
		URLCover = cover;
	}

	public String toString() {
		return "[gmid=" + id + ";nom=" + nom + ";type=" + nom + ";annee="
				+ annee + "]";
	}

	public long getArtistMaId() {
		return artistMaId;
	}

	public void setArtistMaId(long artistMaId) {
		this.artistMaId = artistMaId;
	}

	public long getMaid() {
		return maid;
	}

	public void setMaid(long maid) {
		this.maid = maid;
	}
}